package net.cyndeline.scalarlib.rlgraph.cartogram.rectangular.segmentHeuristic.help

import net.cyndeline.scalarlib.rlgraph.cartogram.rectangular.common.SegmentsOfRectangle

/**
 * Common size methods.
 */
object Geometry {
  def area(s: SegmentsOfRectangle): Int = width(s) * height(s)
  def width(s: SegmentsOfRectangle): Int = s.right.value - s.left.value + 1
  def height(s: SegmentsOfRectangle): Int = s.bottom.value - s.top.value + 1
}
